<?

include "../config/constants.php";

if(!$_POST[RID])
{
	echo "ERROR";
	exit;
}
$rid = $_POST[RID];

mysql_connect("localhost", "canss", "1022") or die("ERROR: Could not connect ".mysql_error());
mysql_select_db("rule_db");

$query = "SELECT `rname` FROM `rule` WHERE `rid`='$rid'";
$result = mysql_query($query);

if(!$result)
{
	echo "ERROR: could not query";
	exit;
}

if( $row = mysql_fetch_row($result) )
{
	echo $row[0];
}

?>
